package friendsbtt.core;

import java.util.logging.Logger;

public class Log  {
	private Logger log;

	private static Log instance;
	
	private Log(String applicationName){
		log = Logger.getLogger(applicationName);
	}
	
	private static Log getInstance(){
		if(instance == null){
			 instance = new Log(Settings.getApplicationSettings().get("applicationname"));
		}
		return instance;
	}
	
	public static void info(String msg){
		getInstance().log.info(msg);
	}
	
	public static void error(String msg){
		getInstance().log.severe(msg);
	}
	
	public static void warning(String msg){
		getInstance().log.warning(msg);
	}
}
